﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace orderednumber
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] number = { 97, 65, 32, 17, 58, 43, 79, 81, 23, 10 };
            int max = number[1];
            int min = number[1];
            for (int i = 0; i < 10; i++)
            {
                if (max <= number[i])
                {
                    max = number[i];
                }
                if (min >= number[i])
                {
                    min = number[i];
                }
            }
            int temp = 0;
            for (int i = 9; i > 0; i--)
            {
                for (int j = 0; j < i; j++)
                {
                    if (number[j] > number[j + 1])
                    {
                        temp = number[j + 1];
                        number[j + 1] = number[j];
                        number[j] = temp;
                    }
                }
            }
            Console.WriteLine("the biggest number is " + max);
            Console.WriteLine("the smallest number is " + min);
            Console.WriteLine("从小到大的排序结果：");
            for (int i = 0; i < 10; i++)
            {
                Console.Write(number[i] + " ");
            }
            Console.ReadLine();
        }
    }
}
